Optimal. Leaf size=168 \[ \frac{2 (a c-b d) \sqrt{g \sec (e+f x)} \sqrt{\frac{c \cos (e+f x)+d}{c+d}} \Pi \left (\frac{2 b}{a+b};\frac{1}{2} (e+f x)|\frac{2 c}{c+d}\right )}{a f (a+b) \sqrt{c+d \sec (e+f x)}}+\frac{2 d \sqrt{g \sec (e+f x)} \sqrt{\frac{c \cos (e+f x)+d}{c+d}} \Pi \left (2;\frac{1}{2} (e+f x)|\frac{2 c}{c+d}\right )}{a f \sqrt{c+d \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.06961, antiderivative size = 168, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2962, 3971, 3859, 2807, 2805, 3975} \[ \frac{2 (a c-b d) \sqrt{g \sec (e+f x)} \sqrt{\frac{c \cos (e+f x)+d}{c+d}} \Pi \left (\frac{2 b}{a+b};\frac{1}{2} (e+f x)|\frac{2 c}{c+d}\right )}{a f (a+b) \sqrt{c+d \sec (e+f x)}}+\frac{2 d \sqrt{g \sec (e+f x)} \sqrt{\frac{c \cos (e+f x)+d}{c+d}} \Pi \left (2;\frac{1}{2} (e+f x)|\frac{2 c}{c+d}\right )}{a f \sqrt{c+d \sec (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2962
Rule 3971
Rule 3859
Rule 2807
Rule 2805
Rule 3975
Rubi steps
\begin{align*} \int \frac{\sqrt{g \sec (e+f x)} \sqrt{c+d \sec (e+f x)}}{a+b \cos (e+f x)} \, dx &=\frac{\int \frac{(g \sec (e+f x))^{3/2} \sqrt{c+d \sec (e+f x)}}{b+a \sec (e+f x)} \, dx}{g}\\ &=\frac{d \int \frac{(g \sec (e+f x))^{3/2}}{\sqrt{c+d \sec (e+f x)}} \, dx}{a g}+\frac{(a c-b d) \int \frac{(g \sec (e+f x))^{3/2}}{(b+a \sec (e+f x)) \sqrt{c+d \sec (e+f x)}} \, dx}{a g}\\ &=\frac{\left (d \sqrt{d+c \cos (e+f x)} \sqrt{g \sec (e+f x)}\right ) \int \frac{\sec (e+f x)}{\sqrt{d+c \cos (e+f x)}} \, dx}{a \sqrt{c+d \sec (e+f x)}}+\frac{\left ((a c-b d) \sqrt{d+c \cos (e+f x)} \sqrt{g \sec (e+f x)}\right ) \int \frac{1}{(a+b \cos (e+f x)) \sqrt{d+c \cos (e+f x)}} \, dx}{a \sqrt{c+d \sec (e+f x)}}\\ &=\frac{\left (d \sqrt{\frac{d+c \cos (e+f x)}{c+d}} \sqrt{g \sec (e+f x)}\right ) \int \frac{\sec (e+f x)}{\sqrt{\frac{d}{c+d}+\frac{c \cos (e+f x)}{c+d}}} \, dx}{a \sqrt{c+d \sec (e+f x)}}+\frac{\left ((a c-b d) \sqrt{\frac{d+c \cos (e+f x)}{c+d}} \sqrt{g \sec (e+f x)}\right ) \int \frac{1}{(a+b \cos (e+f x)) \sqrt{\frac{d}{c+d}+\frac{c \cos (e+f x)}{c+d}}} \, dx}{a \sqrt{c+d \sec (e+f x)}}\\ &=\frac{2 d \sqrt{\frac{d+c \cos (e+f x)}{c+d}} \Pi \left (2;\frac{1}{2} (e+f x)|\frac{2 c}{c+d}\right ) \sqrt{g \sec (e+f x)}}{a f \sqrt{c+d \sec (e+f x)}}+\frac{2 (a c-b d) \sqrt{\frac{d+c \cos (e+f x)}{c+d}} \Pi \left (\frac{2 b}{a+b};\frac{1}{2} (e+f x)|\frac{2 c}{c+d}\right ) \sqrt{g \sec (e+f x)}}{a (a+b) f \sqrt{c+d \sec (e+f x)}}\\ \end{align*}
Mathematica [C] time = 3.94151, size = 222, normalized size = 1.32 \[ -\frac{2 i \cot (e+f x) \sqrt{g \sec (e+f x)} \sqrt{-\frac{c (\cos (e+f x)-1)}{c+d}} \sqrt{\frac{c (\cos (e+f x)+1)}{c-d}} \sqrt{c+d \sec (e+f x)} \left (\Pi \left (1-\frac{c}{d};i \sinh ^{-1}\left (\sqrt{\frac{1}{c-d}} \sqrt{d+c \cos (e+f x)}\right )|\frac{d-c}{c+d}\right )-\Pi \left (\frac{b (d-c)}{b d-a c};i \sinh ^{-1}\left (\sqrt{\frac{1}{c-d}} \sqrt{d+c \cos (e+f x)}\right )|\frac{d-c}{c+d}\right )\right )}{a f \sqrt{\frac{1}{c-d}} \sqrt{c \cos (e+f x)+d}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.397, size = 479, normalized size = 2.9 \begin{align*}{\frac{-2\,i\cos \left ( fx+e \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{af \left ( a+b \right ) \left ( a-b \right ) \left ( -1+\cos \left ( fx+e \right ) \right ) \left ( d+c\cos \left ( fx+e \right ) \right ) } \left ({\it EllipticF} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},\sqrt{-{\frac{c-d}{c+d}}} \right ){a}^{2}c-{\it EllipticF} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},\sqrt{-{\frac{c-d}{c+d}}} \right ){a}^{2}d+{\it EllipticF} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},\sqrt{-{\frac{c-d}{c+d}}} \right ) abc-{\it EllipticF} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},\sqrt{-{\frac{c-d}{c+d}}} \right ) abd+2\,{\it EllipticPi} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},-1,i\sqrt{{\frac{c-d}{c+d}}} \right ){a}^{2}d-2\,{\it EllipticPi} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},-1,i\sqrt{{\frac{c-d}{c+d}}} \right ){b}^{2}d-2\,{\it EllipticPi} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},{\frac{a-b}{a+b}},i\sqrt{{\frac{c-d}{c+d}}} \right ) abc+2\,{\it EllipticPi} \left ({\frac{i \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sin \left ( fx+e \right ) }},{\frac{a-b}{a+b}},i\sqrt{{\frac{c-d}{c+d}}} \right ){b}^{2}d \right ) \sqrt{{\frac{g}{\cos \left ( fx+e \right ) }}}\sqrt{{\frac{d+c\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }}}\sqrt{{\frac{d+c\cos \left ( fx+e \right ) }{ \left ( c+d \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}\sqrt{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{d \sec \left (f x + e\right ) + c} \sqrt{g \sec \left (f x + e\right )}}{b \cos \left (f x + e\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{g \sec{\left (e + f x \right )}} \sqrt{c + d \sec{\left (e + f x \right )}}}{a + b \cos{\left (e + f x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{d \sec \left (f x + e\right ) + c} \sqrt{g \sec \left (f x + e\right )}}{b \cos \left (f x + e\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]